package com.wwmz.strategy.pattern.promotion;

import java.util.Set;

/**
 * Created by wumz on 2020/9/22 10:21
 */
public class Test {

    public static void main(String[] args) {

//        PromotionActivity cashbackStrategy = new PromotionActivity(new CashbackStrategy());
//        cashbackStrategy.execute();
//
//        PromotionActivity groupbuyStrategy = new PromotionActivity(new GroupbuyStrategy());
//        groupbuyStrategy.execute();


        IPromotionStrategy promotionStrategy =  PromotionStrategyFacory.getPromotionStrategy(null);
        promotionStrategy.doPromotion();





//        Set<String> promotionKeys = PromotionStrategyFacory.getPromotionKeys();
//        for (String promotionKey: promotionKeys) {
//            if ("COUPON".equals(promotionKey)){
//                IPromotionStrategy promotionStrategy =  PromotionStrategyFacory.getPromotionStrategy(promotionKey);
//                promotionStrategy.doPromotion();
//            }
//        }





    }
}
